/*
 * ws2812.h
 *
 *  Created on: Jun 22, 2020
 *      Author: admin
 */

#ifndef USER_INC_WS2812_H_
#define USER_INC_WS2812_H_

#include "main.h"
#include "tim.h"

//1=Period/2 0=Period*0.3
#define BIT_1 30u
#define BIT_0 18u
#define PIXEL_NUM 60

typedef struct __HAL_LED_PWM_BufferTypedef
{
	const uint16_t head[3];
	uint16_t data[24*PIXEL_NUM];
	const uint16_t tail;
}HAL_LED_PWM_BufferTypedef;

void WS2812_SetPixelBuffer(uint8_t* pixelBuffer);
void WS2812_SendData(void);

#endif /* USER_INC_WS2812_H_ */
